﻿@typeparam TItem

@if (Visible && HasPermission)
{
    if (ParentActions.Type == ActionType.Dropdown)
    {
        if (Primary == false)
        {
            <DropdownItem Clicked="@ActionClickedAsync" Disabled=@Disabled>@Text</DropdownItem>
        }
    }
    else
    {
        <Button Block="true"
                Color="@Color"
                Clicked="@ActionClickedAsync"
                Disabled=@Disabled>
            @if(!string.IsNullOrEmpty(Icon))
            {
                <Icon Name="@Icon" Class="me-1"/>
            }
            <Span>
                @Text
            </Span>
        </Button>
    }
}
